package com.app.service.impl;

import com.app.mapper.BackendUserMapper;
import com.app.pojo.BackendUser;
import com.app.service.BackednUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @program: App_SSM
 * @description:
 * @author: Mr.peng
 * @create: 2020-06-10 21:27
 **/
@Service
public class BackendUserServiceImpl implements BackednUserService {
    @Resource
    BackendUserMapper userMapper;
    @Override
    public BackendUser selectByPrimaryKey(String usercode, String pass) {
        BackendUser user=new BackendUser();
        user=userMapper.selectByPrimaryKey(usercode);
        if (user!=null){
            if (!user.getUserPassword().equals(pass)){
                user=null;
            }
        }
        return user;
    }
}
